#include "mycharactor.h"
#include <QPen>
#include <QPainter>

MyCharactor::MyCharactor(QQuickItem *parent) : QQuickPaintedItem(parent),m_x(0),m_y(0)
{

}

void MyCharactor::paint(QPainter *painter){
    QPen pen;
    pen.setWidth(2);
    pen.setColor(Qt::black);

    painter->setRenderHint(QPainter::Antialiasing, true);
    painter->setPen(pen);

    QFont font;
    font.setPointSize(90);
    font.setBold(true);

    QPainterPath textPath;
    textPath.addText(this->m_x,this->m_y, font, this->m_text);
    QBrush brush(QColor(255,255,255));
    painter->setBrush(brush);
    painter->drawPath(textPath);

}
